// pages/setDetail/setDetail.js
Page({
  data: {},
  showModal(e){
    this.setData({
      modalName: e.currentTarget.dataset.target
    })
  },
  hideModal(e){
    this.setData({
      modalName: null
    })
  },
  loginOut(){
    wx.removeStorageSync('userinfo')
    wx.switchTab({
      url: '/pages/me/me',
    })
    this.hideModal()
  },
  toLogin(e){
    wx.navigateTo({
      url: '/pages/login/login',
    })
  },
  onShow(){
    let user = wx.getStorageSync('userinfo')
    this.setData({
      user: user
    })
  }
})